const autoprefixer = require('autoprefixer');
const pxtorem = require('postcss-pxtorem');

module.exports = {
  //去除打包后生成的.map文件
  productionSourceMap: false,
  publicPath: './',
  // outputDir: 'docs',
  // publicPath: process.env.NODE_ENV === 'production' ? '/vant-demo/' : '/',
  // devServer: {
  //   disableHostCheck: true
  // },
  assetsDir: './deskassets',
  // outputDir: '../build',
  devServer: {
    disableHostCheck: true,
    proxy: {
      '/Api': {
        target: 'http://mjsx.xiaotongren.com/Api',
        changeOrigin: true,
        ws: false,
        pathRewrite: {
          '^/Api': '/'
        }
      }
    }

  },
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          autoprefixer(),
          pxtorem({
            rootValue: 37.5,
            propList: ['*'],
            // 该项仅在使用 Circle 组件时需要
            // 原因参见 https://github.com/youzan/vant/issues/1948
            selectorBlackList: ['van-circle__layer']
          })
        ]
      }
    }
  }
};